<%--
  Created by IntelliJ IDEA.
  User: 星星在唱歌
  Date: 2022/3/1
  Time: 14:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/bootstarp/bootstrap.css">
    <script src="${pageContext.request.contextPath}/static/bootstarp/bootstrap.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/jquery-3.4.1.js"></script>
</head>
<body>
    <div class="container">
        <h1>电子文档列表</h1>
        <br>
        <form action="${pageContext.request.contextPath}/main?cmd=main" class="form-inline" method="post">
            <div class="form-group">
                <label>文档分类</label>
                <select class="form-control input-sm" name="seid">
                    <option value="">==请选择==</option>
                    <c:forEach items="${ecList}" var="list">
                        <option value="${list.id}" <c:if test="${list.id == seid}">selected</c:if>>${list.name}</option>
                    </c:forEach>
                </select>
                <input type="submit" value="查询" class="form-control input-sm btn-info">
            </div>
            <a href="${pageContext.request.contextPath}/page/insert.jsp" class="btn btn-default pull-right">添加电子文档</a>
        </form>
        <table class="table table-striped table-hover">
            <thead>
            <tr>
                <th>文档编号</th>
                <th>文档名称</th>
                <th>文档摘要</th>
                <th>上传人</th>
                <th>上传时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <c:forEach items="${eeList}" var="e">
                <tr>
                    <td>${e.id}</td>
                    <td>${e.title}</td>
                    <td>${e.summary}</td>
                    <td>${e.uploaduser}</td>
                    <td>${e.createdate}</td>
                    <td><a href="${pageContext.request.contextPath}/main?cmd=upd" class="btn btn-success">修改</a></td>
                    <td><a href="${pageContext.request.contextPath}/main?cmd=del" class="btn btn-primary">删除</a></td>
                </tr>
            </c:forEach>
        </table>
    </div>
</body>
</html>
